class Furniture:
    def __init__(self,name,area):
        self.name=name
        self.area=area

class House:
    def __init__(self,address,area):
        self.address=address
        self.area=area
        self.freearea=area
        self.furniture=[]

    def __str__(self):
        return f'房子在{self.address}，占地面积{self.area}，剩余面积{self.freearea}，家具有{ self.furniture}'
    def add_furniture(self,item):
        if self.freearea>=item.area:
            self.furniture.append(item.name)
            self.freearea-=item.area
        else:
            print('家具太大了，放不下')

if __name__=='__main__':
    my_house=House('学院路七号',158)
    bed=Furniture('床',20)
    ball=Furniture('足球场',1200)
    my_house.add_furniture(bed)
    print(my_house)